<template>
    <div>
    </div>
</template>
<script>
  export default{
    props: {},
    data () {
      return {}
    },
    methods: {
      onLoad(){
        const navigator=weex.requireModule('navigator')
        const pref=weex.requireModule("pref")
          // 初始化主题
          pref.setString('theme','day');
          // 初始化本地语言
          pref.setString('locale', 'zh')
          // 检测是否创建过钱包
          const ac = pref.get('account')
          const current_user_key = pref.getString('current_user_key')
          const isfirst = pref.getString('isfirst') || ''
          if(ac&&current_user_key){
            if(ac[current_user_key]&&ac[current_user_key].is_sure){
              navigator.presentFull({url:'root:pages/home/index.js',animated:false})
            } else {
              const master_key = ac[current_user_key]&&ac[current_user_key].wallet.master_key || ''
              navigator.presentFull({url:'root:pages/login/sure.js',param:{"master_key":master_key},animated:false})
            }
          } else if (isfirst) {
            navigator.presentFull({url:'root:pages/login/import.js',animated:false})
          }else {
            navigator.presentFull({url:'root:pages/guide.js',animated:false})
          }
      }
    },
  }
</script>
<style scoped>
</style>
